<template>
  <div class="newModal" ref="newModal">
    <div class="header">
      <div class="left">
        <div class="status"></div>
        <div class="title">{{title}}</div>
      </div>
      <div class="right">
        <div class="close" @click="close">
          <n-icon size="20"><CloseOutlined /></n-icon>
        </div>
      </div>
    </div>
    <div class="content">
      <slot name="content"></slot>
    </div>
    <div class="operator">
      <slot name="operator"></slot>
    </div>
  </div>
</template>

<script setup>
import { CloseOutlined } from '@vicons/antd'
const props = defineProps({
  title: {
    type: String,
    default: ''
  }
})
const emit = defineEmits(['closeModal'])
const close = () => {
  emit('closeModal', false)
}
</script>

<style scoped lang="scss">
.newModal{
  width: 570px;
  height: 250px;
  background: red;
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  background: url("@/assets/back/modalBg.png") no-repeat;
  background-size: 100% 100%;
  padding: 8px 15px;
  .header{
    display: flex;
    justify-content: space-between;
    color: #fff;
    font-size: 20px;
    padding: 15px;
    border-bottom: 1px solid #ffffff57;
    .close{
      cursor: pointer;
    }
  }
}
</style>
